import React from "react";
import {Image, View} from "@tarojs/components";
import pload from './loading.gif'
import './index.scss'

const Loading = ({loading=false,finished=false}) =>{
    const status=()=>{
        if(loading){
            return '努力加载中...'
        }else if(finished){
            return '- 我是有底线的 -'
        }else{
            return ''
        }
    }
    return (
        <View className="loadBox">
            {loading&&(
                <View className="loadingio-spinner-spinner">
                    <View className="loading">
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                        <View className="div"></View>
                    </View>
                </View>
            )}
            <View>{status()}</View>
        </View>
    )
}
export default Loading
